#ifndef __SIMPLE_MOCKS_H__
#define __SIMPLE_MOCKS_H__

#include "libSzarp2/include/config_info.h"
#include "libSzarp2/include/szarp_config.h"

namespace mocks {

class TSzarpConfigString {
public:
	TSzarpConfigString(const std::wstring& prefix = L"")
	{
		szarp_config.SetPrefix(prefix);
	}

	int readString(const std::string& xml_string)
	{
		xmlDocPtr doc;
		int ret;

		xmlLineNumbersDefault(1);
		xmlChar * xml_char_string = xmlCharStrdup(xml_string.c_str());
		doc = xmlParseDoc(xml_char_string);

		if (doc == NULL) {
			return 1;
		}

		ret = szarp_config.parseXML(doc);
		xmlFreeDoc(doc);

		return ret;
	}

	TDevice* getFirstDevice() const
	{
		return szarp_config.GetFirstDevice();
	}

private:
	TSzarpConfig szarp_config;
};

}


#endif
